Skip to main content

Get a List of All Templates

The endpoint is used to get a list of all system templates including Video, Carousel, Image, Quotes and Memes templates. This is a paginated endpoint and hence you will receive a paginated response.

Request URL

  • GET https://brain.predis.ai/predis_api/v1/get_templates/

Request Parameters

NameDescriptionTypeDefault ValuePossible ValuesRequired
brand_idThe brand_id serves as the unique identifier for your brand. Using the brand_id, you will also have access to your custom templates on the first page.StringNoneYOUR_BRAND_IDYes
media_typeTo obtain templates of a specific media type.Stringsingle_imagesingle_image, carousel, videoNo
post_typeTo obtain templates of a specific type of post. For meme and quotes post media_type should be single_image.Stringgenericgeneric, meme, quotesNo
aspect_ratioTo obtain templates of a specific aspect ratio.Stringallsquare, portrait, landscape, allNo
page_nIndicate the page number to retrieve templates from that particular page.Integer11, 2, 3...etcNo
items_nIndicate the desired number of templates for each page.Integer101, 2, 3...etcNo

Sample Success Response

{
"templates": [{
"template_id": "...",
"media_type": "..."
}],
"total_pages": 50,
"errors": []
}

Sample Error Response

{
"errors": [{
"detail": "...",
"solution": "..."
}]
}

Response Codes

HTTP Status CodeError CodeUser MessageRecommended solution
429001Maximum number of requests reachedMaximum number of hourly requests reached You have been rate-limited. Wait for sometime and try again
400002Invalid brand_id providedYou have provided an invalid brand_id. Please provide a valid brand_id and try again. Read more here
400003Page numbers of Items number is invalidMake sure the value of page_n and items_n is integer
400004Provided aspect_ratio is not supportedMake sure the value of aspect_ratio field is supported. Please check the Request Parameters in the above table for more details
400005The provided value for the media_type field is not validMake sure the value is one of single_image, carousel or video
400006The provided value for the video_duration field is not validMake sure the value is either short or long
400007The provided value for the post_type field is not validMake sure the value is either generic, meme or quotes
400008The provided value for the post_type field is not valid for the given media_typeThe provided post_type and media_type combination of post is not supported yet. Please check the Request Parameters in the above table for more details

Rate Limiting

Standard API rate limits apply to this endpoint. Read more about the rate limits here